package com.zsz.springboot.service.impl;

import com.zsz.springboot.mapper.StudentMapper;
import com.zsz.springboot.model.Student;
import com.zsz.springboot.service.StudentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;


@Service
public class StudentServiceImpl implements StudentService {

    @Autowired

    private StudentMapper studentMapper;

    @Transactional
    @Override
    public int updateStudentById(Student student) {

        int updateStudent=studentMapper.updateByPrimaryKeySelective(student);

        int a=10/0;

        return updateStudent;
    }
}
